function createAlbumPhoto(id) {
	$.ajaxSetup({async:false});
	$('#bouton_creation_album_' + id).attr('disabled', true);
	
	var parametres = { className: 'GererAlbumPhotoAction', cmd: "insertWithValues", id:id, nom:id, commentaire:''};
	var retour;
	$.post('/outils/forwarder/Forwarder.php', parametres, function(data) {
		retour = JSON.parse(data);
	});
	if (retour.succes) {
		parametres = { className: 'GererConcertAction', cmd: "linkWithConcertIfExists", idAlbumPhoto:id, idConcert:id};
		var retourLienConcert;
		$.post('/outils/forwarder/Forwarder.php', parametres, function(data) {
			retourLienConcert = JSON.parse(data);
		});
		if (!retourLienConcert.succes) {
			$('#bouton_creation_album_' + id).attr('disabled', false);
		}
	} else {
		$('#bouton_creation_album_' + id).attr('disabled', false);
		
	}
	$('#span_creation_album_' + id).html(retour.detail);
	$.ajaxSetup({async:true});
	return retour.succes;
}

function createRepertoireAlbumPhoto(id) {
	$.ajaxSetup({async:false});
	$('#bouton_creation_repertoire_album_' + id).attr('disabled', true);
	
	var parametres = { className: 'GererAlbumPhotoAction', cmd: "createRepertoireAlbumPhoto", id:id, nom:id, commentaire:''};
	var retour;
	$.post('/outils/forwarder/Forwarder.php', parametres, function(data) {
		retour = JSON.parse(data);
	});
	if (!retour.succes) {
		$('#bouton_creation_repertoire_album_' + id).attr('disabled', false);
	}
	$('#span_creation_repertoire_album_' + id).html(retour.detail);
	$.ajaxSetup({async:true});
	return retour.succes;
}

function createPhoto(idAlbumPhoto, nomPhotoAlbum, nomPhotoAlbumForId) {
	$.ajaxSetup({async:false});
	$('#bouton_creation_photo_' + idAlbumPhoto + '_' + nomPhotoAlbumForId).attr('disabled', true);
	
	var parametres = { className: 'GererPhotoAction', cmd: "createEnregistrementPhoto", idAlbumPhoto:idAlbumPhoto, nomPhotoAlbum:nomPhotoAlbum, commentaire:''};
	var retour;
	$.post('/outils/forwarder/Forwarder.php', parametres, function(data) {
		retour = JSON.parse(data);
	});
	if (!retour.succes) {
		$('#bouton_creation_photo_'  + idAlbumPhoto + '_' + nomPhotoAlbumForId).attr('disabled', false);
	}
	$('#span_creation_photo_' + idAlbumPhoto + '_' + nomPhotoAlbumForId).html(retour.detail);
	$.ajaxSetup({async:true});
	return retour.succes;
}

function deleteEnregistrementPhotoAlbum(idAlbumPhoto, nomPhotoAlbum, nomPhotoAlbumForId) {
	$.ajaxSetup({async:false});
	$('#bouton_suppression_photo_' + idAlbumPhoto + '_' + nomPhotoAlbumForId).attr('disabled', true);
	
	var parametres = { className: 'GererPhotoAction', cmd: "deleteEnregistrementPhoto", idAlbumPhoto:idAlbumPhoto, nomPhotoAlbum:nomPhotoAlbum};
	var retour;
	$.post('/outils/forwarder/Forwarder.php', parametres, function(data) {
		retour = JSON.parse(data);
	});
	if (!retour.succes) {
		$('#bouton_suppression_photo_' +  + idAlbumPhoto + '_' + nomPhotoAlbumForId).attr('disabled', false);
	}
	$('#span_suppression_photo_' +  + idAlbumPhoto + '_' + nomPhotoAlbumForId).html(retour.detail);
	$.ajaxSetup({async:true});
	return retour.succes;
}